home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Full / Paragon Drive Backup 9 / DB90_SE_x32.msi / Data1.cab / _D3939FFFB63944CC9E474178D5D989D0 < prev    next >
Text File  |  2004-02-07  |  16KB  |  724 lines

  1. //    WebHelp 5.10.005
  2. var gsPPath="";
  3. var gaPaths=new Array();
  4. var gaAvenues=new Array();
  5.  
  6. var goFrame=null;
  7. var gsStartPage="";
  8. var gsRelCurPagePath="";
  9. var gsSearchFormHref="";
  10. var gnTopicOnly=-1;
  11. var gnOutmostTopic=-1;
  12.  
  13. var BTN_TEXT=1;
  14. var BTN_IMG=2;
  15.  
  16. var goSync=null;
  17.  
  18. var goShow=null;
  19. var goHide=null;
  20.  
  21. var goPrev=null;
  22. var goNext=null;
  23. var gnForm=0;
  24. var goShowNav=null;
  25. var goHideNav=null;
  26.  
  27. var goWebSearch=null;
  28.  
  29. var gsBtnStyle="";
  30. var gaButtons=new Array();
  31. var gaTypes=new Array();
  32. var whtopic_foldUnload=null;
  33. var gbWhTopic=false;
  34. var gbCheckSync=false;
  35. var gbSyncEnabled=false;
  36.  
  37. function setButtonFont(sType,sFontName,sFontSize,sFontColor,sFontStyle,sFontWeight,sFontDecoration)
  38. {
  39.     var vFont=new whFont(sFontName,sFontSize,sFontColor,sFontStyle,sFontWeight,sFontDecoration);
  40.     gsBtnStyle+=".whtbtn"+sType+"{"+getFontStyle(vFont)+"}";
  41. }
  42.  
  43. function writeBtnStyle()
  44. {
  45.     if(gaButtons.length>0)
  46.     {
  47.         if(gsBtnStyle.length>0)
  48.         {
  49.             var sStyle="<style type='text/css'>";
  50.             sStyle+=gsBtnStyle+"</style>";
  51.             document.write(sStyle);
  52.         }
  53.     }
  54. }
  55.  
  56. function button(sText,nWidth,nHeight)
  57. {
  58.     this.sText=sText;
  59.     this.nWidth=nWidth;
  60.     this.nHeight=nHeight;
  61.     
  62.     this.aImgs=new Array();
  63.     var i=0;
  64.     while(button.arguments.length>i+3)
  65.     {
  66.         this.aImgs[i]=button.arguments[3+i];
  67.         i++;
  68.     }
  69. }
  70.  
  71. //project info
  72. function setRelStartPage(sPath)
  73. {
  74.     if(gsPPath.length==0)
  75.     {
  76.         gsPPath=_getFullPath(_getPath(document.location.href),_getPath(sPath));
  77.         gsStartPage=_getFullPath(_getPath(document.location.href),sPath);
  78.         gsRelCurPagePath=_getRelativeFileName(gsStartPage,document.location.href);
  79.     }
  80. }
  81.  
  82. function getImage(oImage,sType)
  83. {
  84.     var sImg="";
  85.     if(oImage&&oImage.aImgs&&(oImage.aImgs.length>0))
  86.     {
  87.         sImg+="<img alt=\""+sType+"\" src=\""+oImage.aImgs[0]+"\"";
  88.         if(oImage.nWidth>0)
  89.             sImg+=" width="+oImage.nWidth;
  90.         if(oImage.nHeight>0)
  91.             sImg+=" height="+oImage.nHeight;
  92.         sImg+=" border=0>";
  93.     }
  94.     return sImg;
  95. }
  96.  
  97. function addTocInfo(sTocPath)
  98. {
  99.     gaPaths[gaPaths.length]=sTocPath;
  100. }
  101.  
  102. function addAvenueInfo(sName,sPrev,sNext)
  103. {
  104.     gaAvenues[gaAvenues.length]=new avenueInfo(sName,sPrev,sNext);    
  105. }
  106.  
  107. function addButton(sType,nStyle,sText,sHref,sOnClick,sOnMouseOver,sOnLoad,nWidth,nHeight,sImg1,sImg2,sImg3)
  108. {
  109.     var sButton="";
  110.     var nBtn=gaButtons.length;
  111.     if(sType=="prev")
  112.     {
  113.         if(canGo(false))
  114.         {
  115.             var sTitle="Previous Topic";
  116.             goPrev=new button(sText,nWidth,nHeight,sImg1,sImg2,sImg3);
  117.             sButton="<a title=\""+sTitle+"\" class=\"whtbtnprev\" href=\"javascript:void(0);\" onclick=\"goAvenue(false);return false;\">";
  118.             if(nStyle==BTN_TEXT)
  119.                 sButton+=goPrev.sText;
  120.             else
  121.                 sButton+=getImage(goPrev,sTitle);
  122.             sButton+="</a>";
  123.         }
  124.     }
  125.     else if(sType=="next")
  126.     {
  127.         if(canGo(true))
  128.         {
  129.             var sTitle="Next Topic";
  130.             goNext=new button(sText,nWidth,nHeight,sImg1,sImg2,sImg3);
  131.             sButton="<a title=\""+sTitle+"\" class=\"whtbtnnext\" href=\"javascript:void(0);\" onclick=\"goAvenue(true);return false;\">";
  132.             if(nStyle==BTN_TEXT)
  133.                 sButton+=goNext.sText;
  134.             else
  135.                 sButton+=getImage(goNext,sTitle);
  136.             sButton+="</a>";
  137.         }
  138.     }
  139.     else if(sType=="show")
  140.     {
  141.         if(isTopicOnly()&&(!gbOpera6||gbOpera7))
  142.         {
  143.             var sTitle="Show Navigation Component";
  144.             goShow=new button(sText,nWidth,nHeight,sImg1,sImg2,sImg3);
  145.             sButton="<a title=\""+sTitle+"\" class=\"whtbtnshow\" href=\"javascript:void(0);\" onclick=\"show();return false;\">";
  146.             if(nStyle==BTN_TEXT)
  147.                 sButton+=goShow.sText;
  148.             else
  149.                 sButton+=getImage(goShow,sTitle);
  150.             sButton+="</a>";
  151.         }
  152.     }
  153.     else if(sType=="hide")
  154.     {
  155.         if(!isTopicOnly()&&!gbOpera6)
  156.         {
  157.             var sTitle="Hide Navigation Component";
  158.             goHide=new button(sText,nWidth,nHeight,sImg1,sImg2,sImg3);
  159.             sButton="<a title=\""+sTitle+"\" class=\"whtbtnhide\" href=\"javascript:void(0);\" onclick=\"hide();return false;\">";
  160.             if(nStyle==BTN_TEXT)
  161.                 sButton+=goHide.sText;
  162.             else
  163.                 sButton+=getImage(goHide,sTitle);
  164.             sButton+="</a>";
  165.         }
  166.     }
  167.     else if(sType=="shownav")
  168.     {
  169.         if(isShowHideEnable())
  170.         {
  171.             var sTitle="Show Navigation Component";
  172.             goShowNav=new button(sText,nWidth,nHeight,sImg1,sImg2,sImg3);
  173.             sButton="<a title=\""+sTitle+"\" class=\"whtbtnshownav\" href=\"javascript:void(0);\" onclick=\"showHidePane(true);return false;\">";
  174.             if(nStyle==BTN_TEXT)
  175.                 sButton+=goShowNav.sText;
  176.             else
  177.                 sButton+=getImage(goShowNav,sTitle);
  178.             sButton+="</a>";
  179.         }
  180.     }
  181.     else if(sType=="hidenav")
  182.     {
  183.         if(isShowHideEnable())
  184.         {
  185.             var sTitle="Hide Navigation Component";
  186.             goHideNav=new button(sText,nWidth,nHeight,sImg1,sImg2,sImg3);
  187.             sButton="<a title=\""+sTitle+"\" class=\"whtbtnhidenav\" href=\"javascript:void(0);\" onclick=\"showHidePane(false);return false;\">";
  188.             if(nStyle==BTN_TEXT)
  189.                 sButton+=goHideNav.sText;
  190.             else
  191.                 sButton+=getImage(goHideNav,sTitle);
  192.             sButton+="</a>";
  193.         }
  194.     }
  195.     else if(sType=="synctoc")
  196.     {
  197.         if(gaPaths.length>0)
  198.         {
  199.             var sTitle="Sync TOC";
  200.             goSync=new button(sText,nWidth,nHeight,sImg1,sImg2,sImg3);
  201.             sButton="<a title=\""+sTitle+"\" class=\"whtbtnsynctoc\" href=\"javascript:void(0);\" onclick=\"syncWithShow();return false;\">";
  202.             if(nStyle==BTN_TEXT)
  203.                 sButton+=goSync.sText;
  204.             else
  205.                 sButton+=getImage(goSync,sTitle);
  206.             sButton+="</a>";
  207.         }
  208.     }
  209.     else if(sType=="websearch")
  210.     {
  211.         if(gsSearchFormHref.length>0)
  212.         {
  213.             var sTitle="WebSearch";
  214.             goWebSearch=new button(sText,nWidth,nHeight,sImg1,sImg2,sImg3);
  215.             sButton="<a title=\""+sTitle+"\" class=\"whtbtnwebsearch\" href=\""+gsSearchFormHref+"\">";
  216.             if(nStyle==BTN_TEXT)
  217.                 sButton+=goWebSearch.sText;
  218.             else
  219.                 sButton+=getImage(goWebSearch,sTitle);
  220.             sButton+="</a>";
  221.         }
  222.     }
  223.     else if(sType=="searchform")
  224.     {
  225.         gaButtons[nBtn]="NeedSearchForm";
  226.         gaTypes[nBtn]=sType;
  227.     }
  228.     if(sButton.length!=0)
  229.     {
  230.         if(nStyle==BTN_TEXT)
  231.             sButton+=" ";
  232.         gaButtons[nBtn]="<td>"+sButton+"</td>";
  233.         gaTypes[nBtn]=sType;
  234.     }
  235. }
  236.  
  237. function isSyncEnabled()
  238. {
  239.     if(!gbCheckSync)
  240.     {
  241.         var oMsg=new whMessage(WH_MSG_ISSYNCSSUPPORT,this,1,null);
  242.         if(SendMessage(oMsg))
  243.         {
  244.             gbSyncEnabled=oMsg.oParam;
  245.         }
  246.         gbCheckSync=true;
  247.     }
  248.     return gbSyncEnabled;
  249. }
  250.  
  251. function isInPopup()
  252. {
  253.     return (window.name.indexOf("BSSCPopup")!=-1);
  254. }
  255.  
  256. function getIntopicBar(sAlign)
  257. {
  258.     var sHTML="";
  259.     if(gaButtons.length>0)
  260.     {
  261.         sHTML+="<div align="+sAlign+">";
  262.  
  263.         sHTML+="<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\"><tr>";
  264.         for(var i=0;i<gaButtons.length;i++)
  265.         {
  266.             if(gaTypes[i]!="synctoc"||isSyncEnabled())
  267.             {
  268.                 if(gaButtons[i]=="NeedSearchForm")
  269.                     sHTML+=getSearchFormHTML();
  270.                 else
  271.                     sHTML+=gaButtons[i];
  272.             }
  273.         }
  274.         sHTML+="</tr></table>";
  275.  
  276.         sHTML+="</div>";
  277.     }
  278.     return sHTML;
  279. }
  280.  
  281.  
  282. function writeIntopicBar(nAligns)
  283. {
  284.     if(isInPopup()) return;
  285.     if(gaButtons.length>0)
  286.     {
  287.         var sHTML="";
  288.         if(nAligns!=0)
  289.         {
  290.             sHTML+="<table width=100%><tr>"
  291.             if(nAligns&1)
  292.                 sHTML+="<td width=33%>"+getIntopicBar("left")+"</td>";
  293.             if(nAligns&2)
  294.                 sHTML+="<td width=34%>"+getIntopicBar("center")+"</td>";
  295.             if(nAligns&4)
  296.                 sHTML+="<td width=33%>"+getIntopicBar("right")+"</td>";
  297.             sHTML+="</tr></table>";
  298.             document.write(sHTML);
  299.         }
  300.     }
  301. }
  302.  
  303. function sendAveInfoOut()
  304. {
  305.     if(!isInPopup())
  306.         setTimeout("sendAveInfo();",100);
  307. }
  308.  
  309. function sendAveInfo()
  310. {
  311.     var oMsg=new whMessage(WH_MSG_AVENUEINFO,this,1,gaAvenues);
  312.     SendMessage(oMsg);
  313. }
  314.  
  315.  
  316. function onNext()
  317. {
  318.     var oMsg=new whMessage(WH_MSG_NEXT,this,1,null);
  319.     SendMessage(oMsg);
  320. }
  321.  
  322. function onPrev()
  323. {
  324.     var oMsg=new whMessage(WH_MSG_PREV,this,1,null);
  325.     SendMessage(oMsg);
  326. }
  327.  
  328. function createSyncInfo()
  329. {
  330.     var oParam=new Object();
  331.     if(gsPPath.length==0)
  332.         gsPPath=_getPath(document.location.href);
  333.     oParam.sPPath=gsPPath;
  334.     oParam.sTPath=document.location.href;
  335.     oParam.aPaths=gaPaths;
  336.     return oParam;
  337. }
  338.  
  339. function syncWithShow()
  340. {
  341.     if(isTopicOnly())
  342.         show();
  343.     else
  344.     {
  345.         sync();
  346.         showTocPane();
  347.     }
  348. }
  349.  
  350. function showTocPane()
  351. {
  352.     var oMsg=new whMessage(WH_MSG_SHOWTOC,this,1,null);
  353.     SendMessage(oMsg);
  354. }
  355.  
  356. function sendSyncInfo()
  357. {
  358.     if(!isInPopup())
  359.     {
  360.         var oParam=null;
  361.         if(gaPaths.length>0)
  362.         {
  363.             oParam=createSyncInfo();
  364.         }
  365.         var oMsg=new whMessage(WH_MSG_SYNCINFO,this,1,oParam);
  366.         SendMessage(oMsg);
  367.     }
  368. }
  369.  
  370. function sendInvalidSyncInfo()
  371. {
  372.     if(!isInPopup())
  373.     {
  374.         var oMsg=new whMessage(WH_MSG_SYNCINFO,this,1,null);
  375.         SendMessage(oMsg);
  376.     }
  377. }
  378.  
  379. function enableWebSearch(bEnable)
  380. {
  381.     if(!isInPopup())
  382.     {
  383.         var oMsg=new whMessage(WH_MSG_ENABLEWEBSEARCH,this,1,bEnable);
  384.         SendMessage(oMsg);
  385.     }
  386. }
  387.  
  388. function autoSync(nSync)
  389. {
  390.     if(nSync==0) return;
  391.     if(isInPopup()) return;
  392.     if(isOutMostTopic())
  393.         sync();
  394. }
  395.  
  396. function isOutMostTopic()
  397. {
  398.     if(gnOutmostTopic==-1)
  399.     {
  400.         var oMessage=new whMessage(WH_MSG_ISINFRAMESET,this,1,null);
  401.         if(SendMessage(oMessage))
  402.             gnOutmostTopic=0;
  403.         else
  404.             gnOutmostTopic=1;
  405.     }
  406.     return (gnOutmostTopic==1);
  407. }
  408.  
  409. function sync()
  410. {
  411.     if(gaPaths.length>0)
  412.     {
  413.         var oParam=createSyncInfo();
  414.         var oMessage=new whMessage(WH_MSG_SYNCTOC,this,1,oParam);
  415.         SendMessage(oMessage);
  416.     }
  417. }
  418.  
  419.  
  420. function avenueInfo(sName,sPrev,sNext)
  421. {
  422.     this.sName=sName;
  423.     this.sPrev=sPrev;
  424.     this.sNext=sNext;
  425. }
  426.  
  427. function getCurrentAvenue()
  428. {
  429.     var oParam=new Object();
  430.     oParam.sAvenue=null;
  431.     var oMessage=new whMessage(WH_MSG_GETCURRENTAVENUE,this,1,oParam);
  432.     SendMessage(oMessage);
  433.     return oParam.sAvenue;
  434. }
  435.  
  436. function unRegisterListener()
  437. {
  438.     sendInvalidSyncInfo();
  439.     enableWebSearch(false);
  440.     if(whtopic_foldUnload)
  441.         whtopic_foldUnload();
  442. }
  443.  
  444. function onSendMessage(oMsg)
  445. {
  446.     var nMsgId=oMsg.nMessageId;
  447.     if(nMsgId==WH_MSG_GETAVIAVENUES)
  448.     {
  449.         oMsg.oParam.aAvenues=gaAvenues;
  450.         return false;
  451.     }
  452.     else if(nMsgId==WH_MSG_GETTOCPATHS)
  453.     {
  454.         if(isOutMostTopic())
  455.         {
  456.             oMsg.oParam.oTocInfo=createSyncInfo();
  457.             return false;        
  458.         }
  459.         else
  460.             return true;
  461.     }
  462.     else if(nMsgId==WH_MSG_NEXT)
  463.     {
  464.         goAvenue(true);
  465.     }
  466.     else if(nMsgId==WH_MSG_PREV)
  467.     {
  468.         goAvenue(false);
  469.     }
  470.     else if(nMsgId==WH_MSG_WEBSEARCH)
  471.     {
  472.         websearch();
  473.     }
  474.     return true;
  475. }
  476.  
  477. function goAvenue(bNext)
  478. {
  479.     var sTopic=null;
  480.     var sAvenue=getCurrentAvenue();
  481.     var nAvenue=-1;
  482.     if(sAvenue!=null&&sAvenue!="")
  483.     {
  484.         for(var i=0;i<gaAvenues.length;i++)
  485.         {
  486.             if(gaAvenues[i].sName==sAvenue)
  487.             {
  488.                 nAvenue=i;
  489.                 break;
  490.             }
  491.         }
  492.         if(nAvenue!=-1)
  493.         {
  494.             if(bNext)
  495.                 sTopic=gaAvenues[nAvenue].sNext;
  496.             else
  497.                 sTopic=gaAvenues[nAvenue].sPrev;
  498.         }
  499.     }
  500.     else
  501.     {
  502.         for(var i=0;i<gaAvenues.length;i++)
  503.         {
  504.             if(gaAvenues[i].sNext!=null&&gaAvenues[i].sNext.length>0&&bNext)
  505.             {
  506.                 sTopic=gaAvenues[i].sNext;
  507.                 break;
  508.             }
  509.             else if(gaAvenues[i].sPrev!=null&&gaAvenues[i].sPrev.length>0&&!bNext)
  510.             {
  511.                 sTopic=gaAvenues[i].sPrev;
  512.                 break;
  513.             }
  514.         }
  515.     }
  516.     
  517.     if(sTopic!=null&&sTopic!="")
  518.     {
  519.         if(gsPPath!=null&&gsPPath!="")
  520.         {
  521.             sFullTopicPath=_getFullPath(gsPPath,sTopic);
  522.             document.location=sFullTopicPath;
  523.         }
  524.     }
  525. }
  526.  
  527. function canGo(bNext)
  528. {
  529.     for(var i=0;i<gaAvenues.length;i++)
  530.     {
  531.         if((gaAvenues[i].sNext!=null&&gaAvenues[i].sNext.length>0&&bNext)||
  532.             (gaAvenues[i].sPrev!=null&&gaAvenues[i].sPrev.length>0&&!bNext))
  533.             return true;
  534.     }
  535.     return false;
  536. }
  537.  
  538. function show()
  539. {
  540.     if(gsStartPage!="")
  541.         window.location=gsStartPage+"#"+gsRelCurPagePath;
  542. }
  543.  
  544. function hide()
  545. {
  546.     if(goFrame!=null)
  547.     {
  548.         goFrame.location=window.location;
  549.     }
  550. }
  551.  
  552. function isTopicOnly()
  553. {
  554.     if(gnTopicOnly==-1)
  555.     {
  556.         var oParam=new Object();
  557.         oParam.oFrame=null;
  558.         var oMsg=new whMessage(WH_MSG_GETSTARTFRAME,this,1,oParam);
  559.         if(SendMessage(oMsg))
  560.         {
  561.             goFrame=oParam.oFrame;
  562.             gnTopicOnly=0;
  563.         }
  564.         else
  565.             gnTopicOnly=1;
  566.     }
  567.     if(gnTopicOnly==1)
  568.         return true;
  569.     else
  570.         return false;
  571. }
  572.  
  573. function websearch()
  574. {
  575.     if(gbNav4)
  576.     {
  577.         if(document.ehelpform)
  578.             document.ehelpform.submit();
  579.     }
  580.     else
  581.     {
  582.         if(window.ehelpform)
  583.             window.ehelpform.submit();
  584.     }
  585. }
  586.  
  587. function addSearchFormHref(sHref)
  588. {
  589.     gsSearchFormHref=sHref;
  590.     enableWebSearch(true);
  591. }
  592.  
  593. function searchB(nForm)
  594. {
  595.     var sValue=eval("document.searchForm"+nForm+".searchString.value");
  596.     var oMsg=new whMessage(WH_MSG_SEARCHTHIS,this,1,sValue);
  597.     SendMessage(oMsg);
  598. }
  599.  
  600. function getSearchFormHTML()
  601. {
  602.     var sHTML="";
  603.     gnForm++;
  604.     var sFormName="searchForm"+gnForm;
  605.     var sButton="<form name=\""+sFormName+"\" method=\"POST\" action=\"javascript:searchB("+gnForm+")\">"
  606.     sButton+="<input type=\"text\" name=\"searchString\" value=\"- Full Text search -\" size=\"20\"/>";
  607.     if(""=="text")
  608.     {
  609.         sButton+="<a class=\"searchbtn\" href=\"javascript:void(0);\" onclick=\""+sFormName+".submit();return false;\"></a>";
  610.     }
  611.     else if(""=="image")
  612.     {
  613.         sButton+="<a class=\"searchbtn\" href=\"javascript:void(0);\" onclick=\""+sFormName+".submit();return false;\">"
  614.         sButton+="<img src=\"\" border=0></a>";
  615.     }
  616.     sButton+="</form>";
  617.     sHTML="<td align=\"center\">"+sButton+"</td>";
  618.     return sHTML;
  619. }
  620.  
  621. function showHidePane(bShow)
  622. {
  623.     var oMsg=null;
  624.     if(bShow)
  625.         oMsg=new whMessage(WH_MSG_SHOWPANE,this,1,null);
  626.     else
  627.         oMsg=new whMessage(WH_MSG_HIDEPANE,this,1,null);
  628.     SendMessage(oMsg);
  629. }
  630.  
  631. function isShowHideEnable()
  632. {
  633.     if(gbIE4)
  634.         return true;
  635.     else
  636.         return false;
  637. }
  638.  
  639.  
  640. function PickupDialog_Invoke()
  641. {
  642.     if(!gbIE4||gbMac)
  643.     {
  644.         if(typeof(_PopupMenu_Invoke)=="function")
  645.             return _PopupMenu_Invoke(PickupDialog_Invoke.arguments);
  646.     }
  647.     else
  648.     {
  649.         if(PickupDialog_Invoke.arguments.length>2)
  650.         {
  651.             var sPickup="whskin_pickup.htm";
  652.             var sPickupPath=gsPPath+sPickup;
  653.             if(gbIE4)
  654.             {
  655.                 var sFrame=PickupDialog_Invoke.arguments[1];
  656.                 var aTopics=new Array();
  657.                 for(var i=2;i<PickupDialog_Invoke.arguments.length;i+=2)
  658.                 {
  659.                     var j=aTopics.length;
  660.                     aTopics[j]=new Object();
  661.                     aTopics[j].m_sName=PickupDialog_Invoke.arguments[i];
  662.                     aTopics[j].m_sURL=PickupDialog_Invoke.arguments[i+1];
  663.                 }
  664.  
  665.                 if(aTopics.length>1)
  666.                 {
  667.                     var nWidth=300;
  668.                     var nHeight=180;
  669.                     var    nScreenWidth=screen.width;
  670.                     var    nScreenHeight=screen.height;
  671.                     var nLeft=(nScreenWidth-nWidth)/2;
  672.                     var nTop=(nScreenHeight-nHeight)/2;
  673.                     if(gbIE4)
  674.                     {
  675.                         var vRet=window.showModalDialog(sPickupPath,aTopics,"dialogHeight:"+nHeight+"px;dialogWidth:"+nWidth+"px;resizable:yes;status:no;scroll:no;help:no;center:yes;");
  676.                         if(vRet)
  677.                         {
  678.                             var sURL=vRet.m_url;
  679.                             if(sFrame)
  680.                                 window.open(sURL,sFrame);
  681.                             else
  682.                                 window.open(sURL,"_self");
  683.                         }
  684.                     }
  685.                 }
  686.                 else if(aTopics.length==1)
  687.                 {
  688.                     var sURL=aTopics[0].m_sURL
  689.                     if(sFrame)
  690.                         window.open(sURL,sFrame);
  691.                     else
  692.                         window.open(sURL,"_self");
  693.                 }
  694.             }
  695.         }
  696.     }
  697. }
  698.  
  699. if(window.gbWhUtil&&window.gbWhMsg&&window.gbWhVer&&window.gbWhProxy)
  700. {
  701.     RegisterListener("bsscright",WH_MSG_GETAVIAVENUES);
  702.     RegisterListener("bsscright",WH_MSG_GETTOCPATHS);
  703.     RegisterListener("bsscright",WH_MSG_NEXT);
  704.     RegisterListener("bsscright",WH_MSG_PREV);
  705.     RegisterListener("bsscright",WH_MSG_WEBSEARCH);
  706.     if(gbMac&&gbIE4)
  707.     {
  708.         if(typeof(window.onunload)!="unknown")
  709.             if(window.onunload.toString!=unRegisterListener.toString)
  710.                 whtopic_foldUnload=window.onunload;
  711.     }
  712.     else
  713.     {
  714.         if(window.onunload)
  715.             if(window.onunload.toString!=unRegisterListener.toString)
  716.                 whtopic_foldUnload=window.onunload;
  717.     }
  718.     window.onunload=unRegisterListener;
  719.     setButtonFont("show","","10pt","","","","");
  720.  
  721.     gbWhTopic=true;
  722. }
  723. else
  724.     document.location.reload();